//
//  VRProfileItemCell.swift
//  VoiceRoom
//
//  Created by Rae on 2024/3/14.
//

import UIKit

class VRProfileItemCell: UITableViewCell {

    private let iconImageView = c_make_ex(UIImageView.self)
        .mode(.scaleAspectFill).corner(20).end()
    private let nameLab = c_make_ex(UILabel.self)
        .text("name").color(.white).font(14.font_bold).end()
    private let timeLab = c_make_ex(UILabel.self)
        .text("11.09 12:31").color(.white.alpha(0.4))
        .font(12.font_medium).end()
    private let contentLab = c_make_ex(UILabel.self)
        .text("A huge tree that fills one’s arms grows from a tiny seedling; a nine-storied tower rises Irom a heap of earth; a thousand li journey starts with th…")
        .color(.white).font(14.font_medium).line(0).end()
    
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        selectionStyle = .none
        backgroundColor = .clear
        contentView.backgroundColor = .clear
        
        contentView.subviews {
            iconImageView
            nameLab
            timeLab
            contentLab
        }
        
        iconImageView.leading(10).top(10).size(40)
        nameLab.top(10)
        nameLab.Leading == iconImageView.Trailing + 10
        timeLab.Leading == nameLab.Leading
        timeLab.Top == nameLab.Bottom + 3
        contentLab.leading(10).trailing(15)
        contentLab.Top == iconImageView.Bottom + 10
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
